in the ‘main’ context thread_pool default threads=32 max_queue=65536; in the ‘http’, ‘server’, or ‘location’ context aio threads=default; 上面例子定义了一个名称为default的线程池,线程数为32个,最大任务队列为65536,如果任务队列超过负载,nginx会提示报错 thread pool "NAME" queue overflow: N tasks waiting
3、可以配置多个独立的线程池用于不通的配置文件使用:
in the ‘main’ context
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
thread_pool one threads=128 max_queue=0; thread_pool two threads=32;
http { server { location /one { aio threads=one; }